package com.leen.common.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 分页公共类
 * @author wy
 */
@ApiModel(description = "接收分页参数类")
public class PageDTO {
    //当前显示第1页
    @ApiModelProperty(value = "当前第几页，默认为1",example = "1")
    private Integer pageNumber;

    //每页显示5笔
    @ApiModelProperty(value = "每页显示几笔，默认为5",example = "5")
   private Integer pageSize;

    public Integer getPageNumber() {
        if(this.pageNumber==null){
            return 1;
        }
        return pageNumber;
    }

    public void setPageNumber(Integer pageNumber) {
        this.pageNumber = pageNumber;
    }

    public Integer getPageSize() {
        if(this.pageSize==null){
            return 5;
        }
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    @Override
    public String toString() {
        return "PageDTO{" +
                "pageNumber=" + pageNumber +
                ", pageSize=" + pageSize +
                '}';
    }
}
